<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<rich:panel header="#{messages['booking.check.list']}">
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputLabel for="from" value="#{messages['from']}" styleClass="standardText_Label" />
		<t:inputCalendar
	    	id="from"
				monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
				currentDayCellClass="currentDayCell" value="#{partnerBookingBean.from}"
				renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
				popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
				renderPopupButtonAsImage="true"
				styleClass="standardText" required="false">
	    	</t:inputCalendar>
	    	
	    <h:outputLabel for="to" value="#{messages['to']}" styleClass="standardText_Label" />
		<t:inputCalendar
	    	id="to"
				monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
				currentDayCellClass="currentDayCell" value="#{partnerBookingBean.to}"
				renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
				popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
				renderPopupButtonAsImage="true"
				styleClass="standardText" required="false">
	    	</t:inputCalendar>
		
		<t:outputText></t:outputText>
		<h:commandButton value="#{messages['search']}" styleClass="button"  action="#{partnerBookingBean.searchAction}"></h:commandButton>
	</t:panelGrid>
	
	<rich:spacer height="20" />
	
	<rich:dataTable id="data" var="obj" value="#{partnerBookingBean.bookingList}" rows="10" width="99%" rowKeyVar="rowNo">
		<rich:column style="text-align:center;width:15%;">
			<f:facet name="header">
				<h:outputText value="#{messages['product.code']}"></h:outputText>
			</f:facet>
			<t:outputText styleClass="standardText" value="#{obj.product.code}"></t:outputText>
		</rich:column>
		<rich:column style="text-align:center;width:15%;">
			<f:facet name="header">
				<h:outputText value="#{messages['membership.no']}"></h:outputText>
			</f:facet>
			<t:outputText styleClass="standardText" value="#{obj.member.membershipNo}"></t:outputText>
		</rich:column>
		<rich:column style="text-align:center;width:15%;">
			<f:facet name="header">
				<h:outputText value="#{messages['confirmation.no']}"></h:outputText>
			</f:facet>
			<t:outputText styleClass="standardText" value="#{obj.confirmationNo}">
			</t:outputText>
		</rich:column>
		<rich:column style="text-align:center;width:15%;">
			<f:facet name="header">
				<h:outputText value="#{messages['from']}"></h:outputText>
			</f:facet>
			<t:outputText styleClass="standardText" value="#{obj.from}">
			</t:outputText>
		</rich:column>
		<rich:column style="text-align:center;width:13%;">
			<f:facet name="header">
				<h:outputText value="#{messages['to']}"></h:outputText>
			</f:facet>
			<t:outputText styleClass="standardText" value="#{obj.to}">
			</t:outputText>
		</rich:column>
	</rich:dataTable>
	
	<rich:spacer height="30" />
	
	<rich:datascroller align="left"  for="data" maxPages="20" />
	<rich:spacer height="30" />
	<t:panelGrid>
		<h:commandButton styleClass="button" immediate="true" value="#{messages['back']}" action="#{partnerBookingBean.backAction}"></h:commandButton>
	</t:panelGrid>

</rich:panel>
